
float sensor_reading = 0.0;        // variable to store the value coming from the sensor
float vref = 1.084;        // variable to store the voltage reference used (check for validity with a DMM)
int fahrenheit = 0;        // variable to store the actual temperature

int centigrade = 0;




void setup() {
 analogReference(INTERNAL);        // set the analog reference to the 1.1V internal reference
 delay(1000);
  Serial.begin(9600);
}

void loop() {
 sensor_reading = analogRead(A0);         // stores the digitized (0 - 1023) analog reading from the LM34
 fahrenheit = (100.0 * sensor_reading * vref)/1023;   // calculates the actual fahrenheit temperature
 centigrade = (((5.0/9.0))*(fahrenheit-32.0)); //conversion to degrees C
  delay(1000);
  Serial.println(fahrenheit);
  Serial.println(centigrade);
}

